<%-- 
    Document   : delete
    Created on : Oct 25, 2012, 12:50:43 AM
    Author     : Swami
--%>

<%@page import="survey_dlt.survey"%>
<%@page import="entityclasses.event"%>
<%@page import="survey_dlt.dltsurvey"%>
<%@page import="java.util.ArrayList"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%!Integer sid = 0;dltsurvey survey;%>

<%@include file="../../mastertemplate/header.jsp" %>
<!-- Please include the header file above this -->		
<!DOCTYPE html>		
        <div class="span9">
          <div class="hero-unit">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
        
        survey s =new survey();
      dltsurvey ds=new dltsurvey();
        ArrayList array = new ArrayList();  
        Object result = request.getAttribute("surveylist");  
//        out.println("hello");
        //String abc=request.getAttribute("event").toString();
        array = (ArrayList<dltsurvey>) result;  
        //out.println(abc);
        out.println("<h1> survey List </h1> <table border=1>");
        for(int i=0;i<array.size();i++)
         {
            out.println("<tr>");
        ds= (dltsurvey) array.get(i);
       
        out.println("<Td>" +ds.getSid());  
        out.println("<Td>" + ds.getTtl());
        out.println("<Td><a href='survey?delete="+ds.getSid()+"' ><input type='button' value='Delete' id='"+ds.getSid()+"'/></a></Td>");
        //out.println("<a href='../qrydlt'><td><input type='button' value='Delete' name='"+ds.getSid()+"' id='"+ds.getSid()+"'></td></a>");
                  
        out.println("<tr>");
         }
        out.println("<table>");
       
        %>
    </div>
            
          
          <div class="row-fluid">
            
          </div><!--/row--> 
          
          </div><!--/row-->
        </div><!--/span-->
      </div><!--/row-->

      <hr/>
<!--   Please include the footer file -->

        <%@include file="../../mastertemplate/footer.jsp"%>   
    </body>
</html>
